<form name="form_admin" method="POST" action="<?php echo formEditAction()?>" onsubmit="return checkform(this);">
<input type="hidden" name="id" value="<?php echo $id?>" />
<input type="hidden" name="opt" value="editWeather" />
<table width="100%" cellpadding="0" cellspacing="0" id="tbledit">
    <tr>
      <td><span class="style1"><?php echo getLang('Url')?></span></td>
      <td>
        <input class="normal3" type="text" name="URL" id="URL" value="<?php echo $weather["cUrlString"] ?>" />
      </td>
    </tr>
	<tr>
        <td width="15%"><span class="style1"><?php echo getLang('City')?></span></td>
        <td>
            <input class="normal3" type="text" name="Name" id="Name" value="<?php echo $weather["cCityName"] ?>" />

        </td>
    </tr>
    <tr>
        <td width="15%"><b>Code RSS</b></td>
        <td>
            <input class="normal2" type="text" name="CodeRss" id="CodeRss" value="<?php echo $weather["cCodeRSS"] ?>" />
            <input type="button" value="get Code" onclick="GetCodeweather(document.getElementById('Name').value)" />
        </td>
    </tr>

    <?php
	if(HAS_BANNER==true)
	{
	?>
    <tr>
        <td><b><?php echo _BANNERIMAGE?></b></td>
      <td>
            <?php echo inputFile('ImgBanner',$weather["cBanner"],'banner')?>
		</td>
    </tr>
    <?php
	}
	?>
    
    <?php
	if(HAS_BACKGROUND==true)
	{
	?>
    <tr>
        <td><b>Background Image</b></td>
        <td>
            <?php echo inputFile('ImgBackground',$weather["cBackground"],'background')?>
        </td>
    </tr>
    <?php
	}
	?>

    <?php
	if($hasTag)
	{
	?>
    <tr>
      <td><b><?php echo _TAGS?></b></td >
      <td><input type="text" id="Tag" name="Tag" class="normal3" value="<?php echo $tag["cTag"]?>"/></td>
    </tr>
	<?php
	}
	?>

     <tr>
        <td><b><?php echo getLang('Status')?></b></td>
        <td>
			<select name="Status" id="Status">
				<?php echo liststatus($weather['iStatus'])?>
			</select>
            &nbsp;&nbsp;
            <b><?php echo getLang('Order')?></b>
            <?php echo getOrderInput()?>
	     </td>
    </tr>

   <tr>
        <td><b><?php echo getLang('Meta Title')?></b></td>
        <td><input class="normal3" style="width:90%" type="text" name="MetaTitle" id="MetaTitle"
		value="<?php echo $weather["cMetaTitle"] ?>" /></td>
    </tr>

    <tr>
        <td><b><?php echo getLang('Meta keywords')?></b></td>
        <td><input class="normal3" style="width:90%" type="text" name="MetaKeywords" id="MetaKeywords"
		 value="<?php echo $weather["cMetaKeywords"] ?>"  /></td>
    </tr>

    <tr>
        <td valign="top" style="vertical-align:top"><b>Meta Description</b></td>
        <td style="padding-bottom:10"><textarea style="height:90px; width:90%;" class="noeditor"
		 name="MetaDescription" ><?php echo $weather["cMetaDescription"] ?></textarea></td>
	</tr>

    <tr>
        <td valign="top" style="vertical-align:top"><b><?php echo getLang('Short Description')?></b></td>
        <td style="padding-bottom:10"><textarea style="height:120px; width:90%;"  id="Description"
		 name="Description" ><?php echo $weather["cDescription"] ?></textarea></td>
	</tr>

    <tr>
	        <td valign="top" style="vertical-align:top"><b><?php echo getLang('Description')?></b></td>
	        <td><textarea style="height:350px; width:90%;" id="Intro"
			name="Intro"><?php echo $weather["cIntro"] ?></textarea></td>
	</tr>
</table>
</form>
<script>
var b;
function checkform(f)
{
    if(f.URL.value=="")
    {
        alert("please enter urlstring");
        f.URL.focus();
        return false;
    }else if(f.Name.value=="")
    {
        alert("Please enter city name");
        f.Name.focus();
        return false;
    }
    return true;
}
function GetCodeweather(citycode)
{
    b=new TrDialog;
    b.init({width:600, height:350,resize:true,model:true});
    b.setTitle('RSS weather');
    b.setUrl('<?php echo formAction('getcode')?>'+'AjaxFrame=true&loc='+citycode);
    b.show();
}
</script>